# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution do
  @moduledoc """
  Dataset distribution for Supervised Tuning.

  ## Attributes

  *   `billableSum` (*type:* `String.t`, *default:* `nil`) - Output only. Sum of a given population of values that are billable.
  *   `buckets` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket.t)`, *default:* `nil`) - Output only. Defines the histogram bucket.
  *   `max` (*type:* `float()`, *default:* `nil`) - Output only. The maximum of the population values.
  *   `mean` (*type:* `float()`, *default:* `nil`) - Output only. The arithmetic mean of the values in the population.
  *   `median` (*type:* `float()`, *default:* `nil`) - Output only. The median of the values in the population.
  *   `min` (*type:* `float()`, *default:* `nil`) - Output only. The minimum of the population values.
  *   `p5` (*type:* `float()`, *default:* `nil`) - Output only. The 5th percentile of the values in the population.
  *   `p95` (*type:* `float()`, *default:* `nil`) - Output only. The 95th percentile of the values in the population.
  *   `sum` (*type:* `String.t`, *default:* `nil`) - Output only. Sum of a given population of values.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :billableSum => String.t() | nil,
          :buckets =>
            list(
              GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket.t()
            )
            | nil,
          :max => float() | nil,
          :mean => float() | nil,
          :median => float() | nil,
          :min => float() | nil,
          :p5 => float() | nil,
          :p95 => float() | nil,
          :sum => String.t() | nil
        }

  field(:billableSum)

  field(:buckets,
    as:
      GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket,
    type: :list
  )

  field(:max)
  field(:mean)
  field(:median)
  field(:min)
  field(:p5)
  field(:p95)
  field(:sum)
end

defimpl Poison.Decoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SupervisedTuningDatasetDistribution do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
